<?php
class BackEndController extends Controller{
	/**
	 * @var string the default layout for the controller view. Defaults to '//layouts/column1',
	 * meaning using a single column layout. See 'protected/views/layouts/column1.php'.
	 */
	public $layout='//layouts/column2';
	public $menu=array();
	/**
	 * @var array the breadcrumbs of the current page. The value of this property will
	 * be assigned to {@link CBreadcrumbs::links}. Please refer to {@link CBreadcrumbs::links}
	 * for more details on how to specify this property.
	 */
	public $breadcrumbs;

	/**
	 * (non-PHPdoc)
	 * @see framework/web/CController::filters()
	 */
	public function filters()
	{
		return array(
            'accessControl',
		);
	}

	/**
	 * (non-PHPdoc)
	 * @see framework/web/CController::accessRules()
	 */
	public function accessRules()
	{
		return array(
			array('allow',
	                'users'=>array('*'),
	                'actions'=>array('login'),
			),
			array('allow',
	                'users'=>array('@'),
			),
			array('deny',
	                'users'=>array('*'),
			),
		);
	}
	
	/**
	 * (non-PHPdoc)
	 * @see protected/components/Controller::getPageTitlePostfix()
	 */
	public function getPageTitlePostfix(){
		return ' | ' . Yii::t('back', 'Control Panel') . parent::getPageTitlePostfix();
	}
}